package cn.supermaster.management.web.service.tool;

import cn.supermaster.management.common.page.TableDataInfo;
import cn.supermaster.management.common.response.WebResponse;
import cn.supermaster.management.tool.domain.GenTable;
import cn.supermaster.management.tool.domain.GenTableColumn;
import org.springframework.ui.ModelMap;

import javax.servlet.http.HttpServletResponse;

/**
 * All rights Reserved, Designed By www.super-bytecode.com
 *
 * @ProjectName: supermaster-management
 * @Package: cn.supermaster.management.web.service.tool
 * @ClassName: IGenService
 * @Description: []
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2021/1/13 20:03
 * @Version: V1.0
 * @Copyright: 2021 www.super-bytecode.com Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
public interface IGenService {
    /*
     * ================================================
     *  页面跳转功能实现
     * ================================================
     */

    /**
     * @description: [跳转到代码生成器首页界面]
     * <p></P>
     * @title: skipGenIndexHtml
     * @author: Lance Ting
     * @date: 2021-01-13
     * @return: java.lang.String
     */
    String skipGenIndexHtml();

    /**
     * @description: [跳转导入表结构界面]
     * <p></P>
     * @title: skipImportTableHtml
     * @author: Lance Ting
     * @date: 2021-01-13
     * @return: java.lang.String
     */
    String skipImportTableHtml();

    /**
     * @description: [跳转修改代码生成业务界面]
     * <p></P>
     * @title: skipModifyGenHtml
     * @author: Lance Ting
     * @date: 2021-01-13
     * @param: modelMap
     * @Param: tableId
     * @return: java.lang.String
     */
    String skipModifyGenHtml(ModelMap modelMap, Long tableId);

    /*
     * ================================================
     *  Rest功能实现
     * ================================================
     */

    /**
     * @description: [查询代码生成列表]
     * <p></P>
     * @title: queryGenListByCondition
     * @author: Lance Ting
     * @date: 2021-01-13
     * @param: genTable
     * @return: cn.supermaster.management.common.page.TableDataInfo
     */
    TableDataInfo queryGenListByCondition(GenTable genTable);

    /***
     * @description: [查询数据库列表]
     * <p></P>
     * @title: queryTableListByCondition
     * @author: Lance Ting
     * @date: 2021-01-13
     * @param: genTable
     * @return: cn.supermaster.management.common.page.TableDataInfo
     */
    TableDataInfo queryTableListByCondition(GenTable genTable);

    /***
     * @description: [查询数据表字段列表]
     * <p></P>
     * @title: queryColumnListByCondition
     * @author: Lance Ting
     * @date: 2021-01-13
     * @param: genTableColumn
     * @return: cn.supermaster.management.common.page.TableDataInfo
     * @throws:
     */
    TableDataInfo queryColumnListByCondition(GenTableColumn genTableColumn);

    /**
     * @description: [导入表结构（保存）]
     * <p></P>
     * @title: doImportTable2Db
     * @author: Lance Ting
     * @date: 2021-01-13
     * @param: tables
     * @return: cn.supermaster.management.common.response.WebResult
     * @throws:
     */
    WebResponse doImportTable2Db(String tables);

    /***
     * @description: [修改代码生成业务]
     * <p></P>
     * @title: doModifyGenTable
     * @author: Lance Ting
     * @date: 2021-01-13
     * @param: genTable
     * @return: cn.supermaster.management.common.response.WebResult
     */
    WebResponse doModifyGenTable(GenTable genTable);

    /**
     * @description: [删除table]
     * <p></P>
     * @title: doRemoveGenTable
     * @author: Lance Ting
     * @date: 2021-01-13
     * @param: ids
     * @return: cn.supermaster.management.common.response.WebResult
     */
    WebResponse doRemoveGenTable(String ids);

    /**
     * @description: [ 预览代码]
     * <p></P>
     * @title: doCodePreview
     * @author: Lance Ting
     * @date: 2021-01-13
     * @param: tableId
     * @return: cn.supermaster.management.common.response.WebResult
     * @throws:
     */
    WebResponse doCodePreview(Long tableId);

    /***
     * @description: [生成代码（下载方式）]
     * <p></P>
     * @title: doDownloadCodeWithZip
     * @author: Lance Ting
     * @date: 2021-01-13
     * @param: response
     * @Param: tableName
     * @return: void
     * @throws:
     */
    void doDownloadCodeWithZip(HttpServletResponse response, String tableName);

    /**
     * @description: []
     * <p></P>
     * @title: doBuildCode
     * @author: Lance Ting
     * @date: 2021-01-13
     * @param: tableName
     * @return: cn.supermaster.management.common.response.WebResult
     * @throws:
     */
    WebResponse doBuildCode(String tableName);

    /**
     * @description: [同步数据库]
     * <p></P>
     * @title: doSnchDatebase
     * @author: Lance Ting
     * @date: 2021-01-13
     * @param: tableName
     * @return: cn.supermaster.management.common.response.WebResult
     * @throws:
     */
    WebResponse doSnchDatebase(String tableName);

    /**
     * @description: [批量生成代码]
     * <p></P>
     * @title: doBatchBuildCode
     * @author: Lance Ting
     * @date: 2021-01-13
     * @param: response
     * @Param: tables
     * @return: void
     * @throws:
     */
    void doBatchBuildCode(HttpServletResponse response, String tables);
}